#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <windows.h>
using namespace std;
#define MAX 1000000
int main()
{
	int N = 1000;
	while (N <= 50000)
	{
		int* a = new int[N];
		for (int i = 0;i < N;i++)a[i] = rand() % MAX;
		int* b = new int[N];
		for (int i = 0;i < N;i++)b[i] = a[i];
		cout << N << " ";
		LARGE_INTEGER t1, t2, t3, t0;
		QueryPerformanceFrequency(&t0);
		QueryPerformanceCounter(&t1);

		for (int i = 0;i < N;i++)
		{
			a[i] = a[i] * 2000;
			a[i] = a[i] / 10000;
		}
		QueryPerformanceCounter(&t2);
		cout << ((t2.QuadPart - t1.QuadPart) * 1000.0 / t0.QuadPart) << " ";

		for (int i = 0;i < N;i++)
		{
			*b = *b * 2000;
			*b = *b / 10000;
			b++;
		}

		QueryPerformanceCounter(&t3);
		cout << ((t3.QuadPart - t2.QuadPart) * 1000.0 / t0.QuadPart) << " "<<endl;

		if(N < 10000) N += 1000;
		else if(N >= 10000 && N < 20000) N += 2000;
		else N += 5000;
	}
}